boxlayout: Fix broken min-size-for-opposite-size
authorBenjamin Otte <otte@redhat.com>
Tue, 9 Nov 2021 02:28:29 +0000 (03:28 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 9 Nov 2021 02:41:43 +0000 (03:41 +0100)
commit76c46739447023368db4c3e6d008b52ff4b249e0
tree9b4c9cac24d703c96d384c5ac6f9be33283ab828
parent0a31201c889a49667d7411bdafc7998a10a220ce
boxlayout: Fix broken min-size-for-opposite-size

Assume a vbox with 2 wrapping labels saying
  Hello World
  Hi Ho
being measured for their minimum width for 3 rows of text.
This should be layouted like
  Hello
  World
  Hi Ho
and measured accordingly.

However, previously this was layouted as
  Hello World
  Hi Ho
with 1.5 lines being assigned to both labels.
That will obviously not compute the above wrapping which clearly
results in a smaller min width.

A reftest testing exactly this was included.
gtk/gtkboxlayout.c
testsuite/reftests/meson.build
testsuite/reftests/vbox-with-2-wrapping-labels-where-one-should-wrap.ref.ui [new file with mode: 0644]
testsuite/reftests/vbox-with-2-wrapping-labels-where-one-should-wrap.ui [new file with mode: 0644]